package com.hand.test.service;/**
 * @author Estelle@앙수청
 * @date 2019/7/20 11:03
 */

import com.hand.test.domain.Matter;
import com.hand.test.domain.Stockin;
import com.hand.test.domain.Stockout;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 *  @author Estelle@앙수청
 *  @date 2019/7/20 11:03
 */
public interface StockInAndOutService {

    Matter queryMatterExistByStore(Integer id);

    @Transactional(rollbackFor = Exception.class)
    Integer addStockin(Stockin stockin);

    @Transactional(rollbackFor = Exception.class)
    void increMatterStockCount(Stockin stockin);

    @Transactional(rollbackFor = Exception.class)
    Integer addStockout(Stockout stockout);

    @Transactional(rollbackFor = Exception.class)
    void decreMatterStockCount(Stockout stockout);

    List<Stockin> queryAllStockin();

    List<Stockin> queryAllStockout();
}
